package org.ManagerSystem.DAO;

import org.ManagerSystem.entity.Department;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentDAO {

    //按部门 did 查询部门信息
    Department queryById(long did);

    //查询所有部门的信息
    List<Department> queryByPage(@Param("start") int start, @Param("pageSize") int pageSize);

    //保存新增的部门信息
    void save(Department department);

    //删除部门信息
    void deleteById(long did);

    //保存修改的部门信息
    void update(Department department);

    //查询总共有几条记录
    int findCount();

    List<Department> queryAll();
}
